home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / misc / allma.zip / FREPLACE.SMM < prev    next >
INI File  |  1994-11-28  |  7KB  |  453 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     _macro.sty
  5. [files]
  6. [charset]
  7.     82
  8.     ANSI (Windows, IBM CP 1252)
  9. [revisions]
  10.     0
  11. [prn]
  12.     PostScript Printer
  13. [port]
  14.     LPT1:
  15. [lang]
  16.     1
  17. [fldnames]
  18.     Field1
  19.     Field2
  20.     Field3
  21.     Field4
  22.     Field5
  23.     Field6
  24.     Field7
  25.     Field8
  26. [desc]
  27.     Find and replace across multiple files
  28.     Lotus WPD Marketing
  29.     Intermediate
  30.     Replace, FileOpen, Local Arrays
  31.     noautorun
  32.     786074104
  33.     31
  34.     676699899
  35.     121
  36.     2
  37.     0
  38.     0
  39.     0
  40.     0
  41.     
  42.     
  43.     
  44.     
  45.     
  46.     
  47.     0
  48. [fopts]
  49.     0
  50.     1
  51.     0
  52.     0
  53.     
  54.     
  55. [lnopts]
  56.     2
  57.     Body Text
  58.     1
  59. [docopts]
  60.     5
  61.     2
  62. [GramStyle]
  63.     
  64. [l1]
  65.     0
  66. [pg]
  67.     2
  68.     46 0 60 0 0 1 0 65535 3 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  69.     86 0 10 1025 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  70. [edoc]
  71. <:#288,9360>Macro by <+!>Charlie Pappas<-!>
  72.  
  73. <:#276,9360>
  74.  
  75. <:#276,9360>function freplace()
  76.  
  77. <:#276,9360>IF IsNewWave()
  78.  
  79. <:#276,9360>    Message("Macro not available while running under HP NewWave.")
  80.  
  81. <:#276,9360>    Exit Function
  82.  
  83. <:#276,9360>ENDIF
  84.  
  85. <:#276,9360>'ignorekeyboard(2)
  86.  
  87. <:#276,9360>again:
  88.  
  89. <:#276,9360>filledit(9001, strcat$(GetDocPath$(), "*.s?m"))
  90.  
  91. <:#276,9360>box = dialogbox(".", "files")
  92.  
  93. <:#276,9360>if box <<<;> 1
  94.  
  95. <:#276,9360>    return 0
  96.  
  97. <:#276,9360>endif
  98.  
  99. <:#276,9360>findit = getdialogfield$(8007)
  100.  
  101. <:#276,9360>replaceit = getdialogfield$(8008)
  102.  
  103. <:#276,9360>if getdialogfield$(8001) = ""
  104.  
  105. <:#276,9360>    message("select files from the list")
  106.  
  107. <:#276,9360>    goto again
  108.  
  109. <:#276,9360>endif
  110.  
  111. <:#276,9360>cdir = getcurrentdir$()
  112.  
  113. <:#276,9360>dim files(100)
  114.  
  115. <:#276,9360>for i = 1 to 100
  116.  
  117. <:#276,9360>    file = Ucase$(strfield$(getdialogfield$(8001), i, " "))
  118.  
  119. <:#276,9360>    if file = "" or file = -1
  120.  
  121. <:#276,9360>        break
  122.  
  123. <:#276,9360>    endif
  124.  
  125. <:#276,9360>    files(i) = file
  126.  
  127. <:#276,9360>next
  128.  
  129. <:#276,9360>Count = GetOpenFileCount()
  130.  
  131. <:#276,9360>If Count <<1
  132.  
  133. <:#276,9360>    Count = 1
  134.  
  135. <:#276,9360>Endif
  136.  
  137. <:#276,9360>Dim OpenFiles(Count)
  138.  
  139. <:#276,9360>GetOpenFileNames(&OpenFiles)
  140.  
  141. <:#276,9360>
  142.  
  143. <:#276,9360>for j = 1 to i - 1
  144.  
  145. <:#276,9360>    file = files(j)
  146.  
  147. <:#284,9360><:f240,2Times New Roman,255,0,0>    ifopen = 0
  148.  
  149. <:#284,9360><:f240,2Times New Roman,255,0,0>    Count = GetOpenFileCount()
  150.  
  151. <:#284,9360><:f240,2Times New Roman,255,0,0>    IF Count <;> 0
  152.  
  153. <:#284,9360><:f240,2Times New Roman,255,0,0>    DIM Filess(Count)
  154.  
  155. <:#284,9360><:f240,2Times New Roman,255,0,0>    GetOpenFileNames(&Filess)
  156.  
  157. <:#284,9360><:f240,2Times New Roman,255,0,0>    FOR II = 1 to Count
  158.  
  159. <:#284,9360><:f240,2Times New Roman,255,0,0>    f = filess(II)
  160.  
  161. <:#284,9360>    <:f240,2Times New Roman,255,0,0>pathplace = instr(0, f, "\")
  162.  
  163. <:#284,9360><:f240,2Times New Roman,255,0,0>    while pathplace <<<;> 0
  164.  
  165. <:#284,9360><:f240,2Times New Roman,255,0,0>        pathtemp = pathplace + 1
  166.  
  167. <:#284,9360><:f240,2Times New Roman,255,0,0>        pathplace = instr(pathtemp, f,"\")
  168.  
  169. <:#284,9360><:f240,2Times New Roman,255,0,0>    wend    
  170.  
  171. <:#284,9360><:f240,2Times New Roman,255,0,0>    length = len(f)
  172.  
  173. <:#284,9360><:f240,2Times New Roman,255,0,0>    pathplace = right$(f, length  - pathtemp + 1)
  174.  
  175. <:#284,9360><:f240,2Times New Roman,255,0,0>    if  pathplace =  ucase$(file) and ifopen = 0 then
  176.  
  177. <:#284,9360><:f240,2Times New Roman,255,0,0>        ifopen = 1<:f>
  178.  
  179. <:#284,9360><:f240,2Times New Roman,255,0,0>    <:f><:f240,2Times New Roman,255,0,0>endif
  180.  
  181. <:#284,9360><:f240,2Times New Roman,255,0,0>    NEXT    <:f>
  182.  
  183. <:#284,9360>    <:f240,2Times New Roman,255,0,0>endif
  184.  
  185. <:#284,9360><:f240,2Times New Roman,255,0,0>    if ifopen = 0 then<:f>
  186.  
  187. <:#276,9360>        FileOpen(strcat$(cdir, file),  1, "")
  188.  
  189. <:#276,9360>        replace(0, 0, 1024, findit, replaceit)
  190.  
  191. <:#276,9360>        save()
  192.  
  193. <:#276,9360>        fileclose()
  194.  
  195. <:#284,9360>    <:f240,2Times New Roman,255,0,0>else<:f>
  196.  
  197. <:#284,9360>        <:f240,2Times New Roman,255,0,0>selectwindow({file})
  198.  
  199. <:#284,9360><:f240,2Times New Roman,255,0,0>        type("<[>CtrlHome]")
  200.  
  201. <:#284,9360><:f240,2Times New Roman,255,0,0>        replace(0,0, 1024, findit, replaceit)
  202.  
  203. <:#284,9360><:f240,2Times New Roman,255,0,0>        save()
  204.  
  205. <:#284,9360><:f240,2Times New Roman,255,0,0>    endif        <:f>
  206.  
  207. <:#276,9360>next
  208.  
  209. <:#276,9360>end function
  210.  
  211. <:#276,9360>
  212.  
  213. DIALOG    files
  214.  
  215. -2134376448    11    89    20    148    187    ""    ""    "Multiple File Find & Replace"
  216.  
  217. FONT    8    "Helv"
  218.  
  219. 6    58    76    8    1000    1342177280    "static"    "&Search Across Files:"    0 
  220.  
  221. 14    6    60    8    1003    1342308352    "static"    "F&ind:"    0 
  222.  
  223. 14    16    120    12    8007    1350631552    "edit"    ""    0 
  224.  
  225. 14    30    60    8    1004    1342308352    "static"    "&Replace With:"    0 
  226.  
  227. 14    40    120    12    8008    1350631552    "edit"    ""    0 
  228.  
  229. 6    68    68    120    9001    1352728587    "listbox"    ""    0 
  230.  
  231. 92    111    40    14    1    1342373889    "button"    "OK"    0 
  232.  
  233. 92    131    40    14    2    1342373888    "button"    "Cancel"    0 
  234.  
  235. 92    100    48    1    8001    1342177280    "static"    ""    0 
  236.  
  237. 80    68    59    8    7999    1342177280    "static"    ""    0 
  238.  
  239. 1    1    147    185    1002    1342177287    "static"    ""    0 
  240.  
  241. END DIALOG
  242.  
  243. >
  244.  
  245. [Embedded]
  246. 00004799
  247. >
  248. [macsum] 2
  249. freplace 0 0 18 2
  250. files 1533 0 -1 71
  251. [macse]
  252. 14 freplace
  253. 0 1317
  254. 13
  255. 11 00000109
  256. 0 3 "Macro not available while running under HP NewWave."
  257. 6 0
  258. 15
  259. 9
  260. 0 268
  261. 13
  262. 0 16 [X] "*.s?m"
  263. 13
  264. 0 31 9001 [X]
  265. 0 26 "." "files"
  266. 13
  267. 8 1
  268. 6 1
  269. 5 1
  270. 18 1
  271. 11 00000225
  272. 5 0
  273. 15
  274. 9
  275. 0 27 8007
  276. 13
  277. 8 2
  278. 0 27 8008
  279. 13
  280. 8 3
  281. 0 27 8001
  282. 13
  283. 7 ""
  284. 18 0
  285. 11 00000352
  286. 0 3 "select files from the list"
  287. 10 00000109
  288. 0 290
  289. 13
  290. 8 4
  291. 5 100
  292. 21 5 [X]
  293. 5 1
  294. 8 6
  295. 5 100
  296. 6 6
  297. 18 2
  298. 12 00000472
  299. 10 00000624
  300. 5 1
  301. 6 6
  302. 3 0
  303. 8 6
  304. 10 00000395
  305. 0 27 8001
  306. 13
  307. 0 20 [X] "{6}" " "
  308. 13
  309. 0 18 [X]
  310. 13
  311. 8 7
  312. 6 7
  313. 7 ""
  314. 18 0
  315. 6 7
  316. 5 -1
  317. 18 0
  318. 1 2
  319. 11 00000595
  320. 10 00000624
  321. 6 6
  322. 6 7
  323. 23 5
  324. 10 00000439
  325. 0 1050
  326. 13
  327. 8 8
  328. 6 8
  329. 5 1
  330. 18 5
  331. 11 00000680
  332. 5 1
  333. 8 8
  334. 6 8
  335. 21 9 [X]
  336. 0 1051 &9
  337. 5 1
  338. 8 10
  339. 6 6
  340. 5 1
  341. 3 1
  342. 6 10
  343. 18 2
  344. 12 00000805
  345. 10 00001521
  346. 5 1
  347. 6 10
  348. 3 0
  349. 8 10
  350. 10 00000717
  351. 6 10
  352. 22 5
  353. 8 7
  354. 5 0
  355. 8 11
  356. 0 1050
  357. 13
  358. 8 8
  359. 6 8
  360. 5 0
  361. 18 3
  362. 11 00001310
  363. 6 8
  364. 21 12 [X]
  365. 0 1051 &12
  366. 5 1
  367. 8 13
  368. 6 8
  369. 6 13
  370. 18 2
  371. 12 00000996
  372. 10 00001310
  373. 5 1
  374. 6 13
  375. 3 0
  376. 8 13
  377. 10 00000918
  378. 6 13
  379. 22 12
  380. 8 14
  381. 0 808 0 "{14}" "\"
  382. 13
  383. 8 15
  384. 6 15
  385. 5 0
  386. 18 1
  387. 11 00001145
  388. 6 15
  389. 5 1
  390. 3 0
  391. 8 16
  392. 0 808 "{16}" "{14}" "\"
  393. 13
  394. 8 15
  395. 10 00001045
  396. 0 14 "{14}"
  397. 13
  398. 8 17
  399. 6 17
  400. 6 16
  401. 3 1
  402. 5 1
  403. 3 0
  404. 0 807 "{14}" [X]
  405. 13
  406. 8 15
  407. 6 15
  408. 0 18 "{7}"
  409. 13
  410. 18 0
  411. 6 11
  412. 5 0
  413. 18 0
  414. 1 1
  415. 11 00001297
  416. 5 1
  417. 8 11
  418. 10 00000961
  419. 6 11
  420. 5 0
  421. 18 0
  422. 11 00001441
  423. 0 16 "{4}" "{7}"
  424. 13
  425. 2 102 1 [X] 1 ""
  426. 2 488 1 0 0 1024 "{2}" "{3}"
  427. 2 103 1
  428. 2 147 1
  429. 10 00001508
  430. 0 796 "{7}"
  431. 0 6 "[16420]"
  432. 2 488 1 0 0 1024 "{2}" "{3}"
  433. 2 103 1
  434. 10 00000770
  435. 6 0
  436. 15
  437. 9
  438. DIALOG files
  439. -2134376448 11 89 20 148 187 "" "" "Multiple File Find & Replace" 
  440. FONT 8 "Helv" 
  441. 6 58 76 8 1000 1342177280 "static" "&Search Across Files:" 0 
  442. 14 6 60 8 1003 1342308352 "static" "F&ind:" 0 
  443. 14 16 120 12 8007 1350631552 "edit" "" 0 
  444. 14 30 60 8 1004 1342308352 "static" "&Replace With:" 0 
  445. 14 40 120 12 8008 1350631552 "edit" "" 0 
  446. 6 68 68 120 9001 1352728587 "listbox" "" 0 
  447. 92 111 40 14 1 1342373889 "button" "OK" 0 
  448. 92 131 40 14 2 1342373888 "button" "Cancel" 0 
  449. 92 100 48 1 8001 1342177280 "static" "" 0 
  450. 80 68 59 8 7999 1342177280 "static" "" 0 
  451. 1 1 147 185 1002 1342177287 "static" "" 0 
  452. 00004824
  453.